﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.IO;

namespace xiaolanshu
{
    public partial class lipstick_info : Form
    {
        public lipstick_info()
        {
            InitializeComponent();
        }

        public LipPanel panel;

        private void MrLishuTest_Load(object sender, EventArgs e)
        {
            BackgroundImage = Properties.Resources.bgd;
            BackgroundImageLayout = ImageLayout.Stretch;
            Size = new Size(1000, 600);

            panel = new LipPanel();
            panel.Size = new Size(900, 350);
            panel.Location = new Point(50, 150);
            panel.Anchor = AnchorStyles.Top;
            Controls.Add(panel);

            MyButton order_price = new MyButton();
            order_price.Location = new Point(800, 20);
            order_price.Text = "按价格排序";
            order_price.Click += new System.EventHandler(order_price_Click);
            Controls.Add(order_price);

            MyButton order_clicknum = new MyButton();
            order_clicknum.Location = new Point(800, 70);
            order_clicknum.Text = "按点击量排序";
            order_clicknum.Click += new System.EventHandler(order_clicknum_Click);
            Controls.Add(order_clicknum);

            MyButton diy = new MyButton();
            diy.Location = new Point(910, 20);

            diy.Height = 85;
            diy.Width = 60;
            //diy.Size = new System.Drawing.Size(20, 20);
            diy.Text = "我要\r\n定制";
            diy.Click += new System.EventHandler(diy_Click);
            Controls.Add(diy);
        }

        private void order_price_Click(object sender, EventArgs e)
        {
            panel.order(LipPanel.OrderMode.Price);
        }

        private void order_clicknum_Click(object sender, EventArgs e)
        {
            panel.order(LipPanel.OrderMode.ClickNum);
        }

        private void MrLishuTest_FormClosing(object sender, FormClosingEventArgs e)
        {
            Data.updateLipData();
        }
        private void diy_Click(object sender, EventArgs e)
        {
            选颜色 f = new 选颜色();
            f.ShowDialog();
        }
    }
}
